package cn.donghuapian.aspect;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * @description:
 * @author: hzw
 * @time: 2024/12/17 10:11
 */
@Aspect
@Component
public class MQAspect {

    @Before("execution(* cn.donghuapian.consumer.CircuitBreakerConsumer.process*(..))")
    public void beforeMethod(JoinPoint joinPoint) {
        int i = 0;
        Object[] args = joinPoint.getArgs();
//        if(i == 0) {
//            throw new RuntimeException("切面异常");
//        }
    }
}
